package com.search.tools;

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;

import java.util.concurrent.TimeUnit;

public class CaffeineTool {

    static Cache<String,String> cache = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES).build();
    public static String getSign(){

        return cache.getIfPresent("sign");
    }

    public static void setSign(String sign){

        cache.put("sign",sign);
    }
}
